Skip to content

Problem: Blockchain upgraded with new API spec#53

Merged
BigtoC merged 6 commits intomainfrom
feature/update-lib-and-network-config
Jun 23, 2025
Merged

Problem: Blockchain upgraded with new API spec#53
BigtoC merged 6 commits intomainfrom
feature/update-lib-and-network-config

Conversation

@BigtoC
Copy link
Copy Markdown
Owner

@BigtoC BigtoC commented Jun 23, 2025

Summary by CodeRabbit

  • New Features
    • Updated blockchain explorer links and titles to use "MANTRA Scan" and the new explorer URL.
  • Improvements
    • Adjusted gas price and fee calculations for improved accuracy.
    • Reduced the gas limit multiplier for more efficient transactions.
  • Chores
    • Upgraded app version to 3.1.0.
    • Updated a key dependency to a new tagged release.

@BigtoC BigtoC self-assigned this Jun 23, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 23, 2025

Walkthrough

The changes update how gas price data is fetched and calculated, adjust constant values for gas calculations and explorer URLs, and update displayed explorer names. The application version and a dependency reference are also incremented. No public API signatures are altered, and all updates are internal or cosmetic.

Changes

File(s) Change Summary
lib/infrastructure/blockchain/blockchain_info_repository.dart Modified fetchGasPrice to use a new API source (baseFee) and simplified denomination handling.
lib/infrastructure/blockchain/wallet_repository.dart Updated gas price calculation in calculateFee to multiply parsed gas price by gasLimitMultiplier.
lib/infrastructure/constants.dart Changed gasLimitMultiplier from 3 to 2; updated explorerUrl to a new domain and path.
lib/presentation/home_page/dapps/tx_status_widget.dart Changed explorer browser title from "MANTRA Explorer" to "MANTRA Scan".
pubspec.yaml Bumped version from 3.0.3 to 3.1.0; updated mantrachain_dart_sdk dependency to tag v0.2.0.
test/infrastructure/blockchain/wallet_repository_test.dart Adjusted fee calculation test expectations to reflect new gas price scaling by gasLimitMultiplier.

Sequence Diagram(s)

sequenceDiagram
    participant UI
    participant BlockchainInfoRepository
    participant QueryAPI

    UI->>BlockchainInfoRepository: fetchGasPrice()
    BlockchainInfoRepository->>QueryAPI: baseFee()
    QueryAPI-->>BlockchainInfoRepository: EvmBaseFee200Response(baseFee)
    BlockchainInfoRepository-->>UI: {gasPrice, amount, denom}
Loading

Possibly related PRs

Poem

A hop and a skip, the gas price now new,
With numbers and names all shiny and true.
The explorer’s address takes a fresh little turn,
While multipliers shrink and the widgets all learn.
Version hops up, dependencies too—
🐰 Cheers to the code, from this rabbit to you!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f16e2b4 and b5eec82.

📒 Files selected for processing (1)
  • test/infrastructure/blockchain/wallet_repository_test.dart (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test
🔇 Additional comments (7)
test/infrastructure/blockchain/wallet_repository_test.dart (7)

18-19: Parameter naming looks good.

The parameter names gasPriceStr and gasInfo are clear and descriptive.


29-29: Addition of gasWanted fields aligns with new API spec.

The addition of gasWanted fields to the test data properly reflects the updated API structure mentioned in the PR objectives.

Also applies to: 48-48, 74-74, 97-97, 115-115


82-86: Same double multiplication pattern - needs verification.

This calculation also multiplies by gasLimitMultiplier twice, consistent with the pattern seen elsewhere but potentially problematic.


127-130: Third instance of double gasLimitMultiplier multiplication.

The pattern of multiplying by gasLimitMultiplier twice is consistent across all test cases, suggesting this might be intentional based on the new API requirements, but it should be verified.


40-40: Updated expected values reflect the new calculation logic.

The increased expected amounts (10000, 6093, 4000) are mathematically consistent with the double multiplication pattern, assuming the multiplier changed from 3 to 2 as mentioned in the summary (3¹ = 3 vs 2² = 4).

Also applies to: 89-89, 106-106


55-58: Improved formatting and readability.

The reformatted assertions with better line breaks and trailing commas improve code readability.

Also applies to: 122-122


60-66: ```shell
#!/bin/bash

Locate wallet_repository implementation file(s)

echo "Searching for wallet_repository files..."
fd -t f -g "wallet_repository.dart"

Inspect any references to gasLimitMultiplier outside of tests

echo -e "\nChecking for gasLimitMultiplier usage in implementation..."
rg -n --glob '!test/**' "gasLimitMultiplier" -A5 -B5 || echo "No non-test references found"

Search for gas limit calculations in implementation

echo -e "\nSearching for gas limit logic in implementation..."
rg -n --glob '!test/**' "gasLimit" -A5 -B5 || echo "No non-test gasLimit references found"


</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4AFCoKvMuAIQv4GAawaxtWbNyIqJXoAd3VYSHIQyABBGwBJSERuUQMAOWxmAUouAFYAZgMAVUQcyGd4IgIAYSN9Y3AoMnp8ADMcAmIyZRp6JlZ2Ll5+YVFxKRl5JiUqVXUtHXqTKDhUVEwOwlJyKl6FAYxOSCpoxEzmNAp5OQUZlTVNbV0wQwbTAwt4AQB6eAxWqiIXAUbBibAUEjfARuTzeXxQmFeHx/AD6f1a+BREO4+EQ6nwVw0tEunAMACIKQYAMRU2LxLo7ah0JLnS7yNqMHwYUiIMywEiQNi4WCKSAAA1aJFw3gA4mhEHZ4AwSGKUFgxa53EjfPF/vgAEokHF4ghXVUheWCxTwVrwZkETmYUiQYUCxD4cHK9AYehAkFgiH8dquyBES28JUC4m4NAoXDHKUUO0TDSQOwkCTwD2ICyyAA0ccYaAsVnoYoAjthKLIYtx4Bowwqk8rEAAKACUqohuHBGD+RHQ4rlTcjiAATAAGCeG5L4DClVWCERiAsAliQEIIbyFkgAD2BaDE9v5kFtFCBPGbAvYVwA5Mg0MwPYdvfQlBgWH9qFmMKm4ALG0vSN0CfbAXwtZBuEuUp6DXZhB3IIFmTFCNlQAfi0UDDlVP1+w3cJByUVo0GwCx42IksBEPDwg0gMkJw0CcAEYyQLTB6BDd9Pwwb85w3S0Yw8MhT3seCUKvDCuOYRc+FjCiLCozxxUlEgABEyBYMUND5AV/GjZlpgFD9ogYYsLGQCsqyuWt6yo0oADESBIDsuylXs8I2MUAFEJGYZx5RIRySEnadpBxecVRGZdNEgeJ4z3A8xGQENANQqN4AhMRcxE9dYzFOzAqcnDgTw20SAsWgCyg888PUfDhUIkhiNI8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PwYAnDQHfydNoAEDHAYFyFyHvwYDuQAA4SAvTAzaAP8JwGBgh8gwz7TDSIBVpcgnIGAwyxxgzaBchWhAz79aB79Jwwz78SAwyL9X9aBWh798hQyxx8gmIz8P8P8wzX9kyUyoAq8TT4AzSLS7Qg5aAURmh7SgA=== -->

<!-- internal state end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=BigtoC/hnotes&utm_content=53):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@BigtoC BigtoC merged commit 349bd11 into main Jun 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant